<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>Title</title>
		<style type="text/css">
			div {
				width: 400px;
				height: 400px;
				background-color: pink;
				display: none;
			}
		</style>
	</head>
	<body>
		<input type="button" value="显示" />
		<input type="button" value="隐藏" />
		<input type="button" value="切换" />
		
		<div></div>
		<script src="jquery-1.12.4.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				//滑入(slideDown)    滑出: slideUp
				$("input").eq(0).click(function(){
					
					//slideDown: 如果不传参数,有一个默认值normal
					//$("div").slideDown();
					//$("div").slideDown(1000);
					$("div").slideDown(1000,function(){
						console.log("额呵呵");
					});
				});
				$("input").eq(1).click(function(){
					$('div').slideUp();
				});
				$("input").eq(2).click(function () {
					
					//如果是滑入状态,就执行滑出的动画
					$("div").slideToggle();
				});
			});
		</script>
	</body>
</html>